package com.epimarket.boutique;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class Controllers
{
	@RequestMapping("/home")
	public ModelAndView home()
	{
		return new ModelAndView("home", "message", "Salut copain!");
	}
	
	@RequestMapping("/hello/{username}")
	public ModelAndView home(@PathVariable String username)
	{
		return new ModelAndView("home", "message", "Salut " + username + "!");
	}
}
